import React, { useState, useMemo } from 'react'

const App = () => {
  const [count, setCount] = useState(100)
  const title = useMemo(() => {
    return Array.from(new Array(100000000))
      .map((item, index) => index + 1)
      .reduce((prev, item) => prev + item, 0)
  }, [])
  return (
    <div>
      <div>金钱：{title}</div>
      <div>{count}</div>
      <button onClick={() => setCount(count + 100)}>按钮</button>
    </div>
  )
}

export default App
